﻿using System;
using System.Diagnostics;

namespace Behaviours.Entities
{
  internal class HashSetDebugView<T> where T : IIndex
  {
    private readonly ArrayPool<T> set;

    public HashSetDebugView(ArrayPool<T> set) => this.set = set ?? throw new ArgumentNullException(nameof (set));

    [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
    public T[] Items => this.set.ToArray();
  }
}
